﻿namespace Zove.Runtime.Core
{
    /// <summary>
    /// Finds the file location of the given class.
    /// </summary>
    public interface IClassFinder
    {
        /// <summary>
        /// Add a new class path
        /// </summary>
        /// <param name="workspace">the class path</param>
        void AddClassPath(string workspace);

        /// <summary>
        /// Get all the workspaces
        /// </summary>
        /// <returns>all the workspaces</returns>
        string[] ClassPaths { get; }

        /// <summary>
        /// Gets the location of the class.
        /// </summary>
        /// <param name="className">the class name</param>
        /// <returns>the file location</returns>
        string GetLocation(string className);

        /// <summary>
        /// Get the source of the class
        /// </summary>
        /// <param name="className">the class name</param>
        /// <returns>source</returns>
        string GetSource(string className);
    }
}
